package org.springcloud.wisdom.springcloud_03_freshman.student.controller;

import org.springcloud.wisdom.springcloud_03_freshman.common.bean.ResponseData;
import org.springcloud.wisdom.springcloud_03_freshman.common.controller.BaseController;
import org.springcloud.wisdom.springcloud_03_freshman.student.entity.Paid;
import org.springcloud.wisdom.springcloud_03_freshman.student.service.PaidService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/pay")
public class PaidController extends BaseController {
    @Autowired
    PaidService paidService;

    /**
     * 根据学号获取新生的缴费信息
     * @param sno 学号
     * @return
     */
    @RequestMapping("/get")
    public ResponseData<Object> getPaidBySid(@RequestParam("sno") String sno){
        return returnObject(paidService.getPaids(sno));
    }
}
